import axios from 'axios'

export async function getStaffList(storeId){
    var resp =await axios.get("/api/petSystem/staff.do",{
        params:{
            method:"",
            storeId
        }
    })
    console.log(resp.data);
    return resp.data;
    //点击修改按钮的时候应该查询店员，把门店的id得传过来
}

export async function addStaff(storeId,staff){
    var resp =await axios.get("/api/petSystem/staff.do",{
        params:{
            method:"addStaff",
            staffName:staff.staffName,
            staffLevel:staff.staffLevel,
            staffTel:staff.staffTel,
            fkStoreId:storeId
        }
    })
    return resp.data;
}

export async function deleteStaff(staffId){
    var resp =await axios.get("/api/petSystem/staff.do",{
        params:{
            method:"deleteStaff",
            staffId
        }
    })
    return resp.data;
}